const url = 'https://test.0871.cn';
const imgurl = 'https://oaxiaochengxu.0871.cn/';

const now = Date.now || function() {
	return new Date().getTime();
};
const isArray = Array.isArray || function(obj) {
	return obj instanceof Array;
};

function Public(address) {
	return function(data, f) {
		uni.request({
			url: url + address,
			data: data,
			header: {
				'content-type': 'application/x-www-form-urlencoded',
				'token': uni.getStorageSync('token'),
			},
			method: "POST",
			success: (res) => {
				f(res.data);
			}
		});
	}
}

 
export default {
	url : url ,
	imgurl : imgurl ,
	login: Public( "/login/index" ),		// 登陆
	
	// 财务系统
	finance_addExpenditure: Public( "/finance/addExpenditure" ),	// 财务录账-支 新增支出	
	finance_addIncome: Public( "/finance/addIncome" ),	// 财务录账-支 新增收入	
	
	
	//-------------------------------------------------我的页面相关----------------------------------------
	
	// 公司职位设置
	my_staffing_addPersonnel_phone_verification: Public( "/my/Staffing/phone_verification" ),	// 添加团队人员 - 验证手机号
}